/*
 * Copyright (c)2009 Shanghai Tudou Co. Ltd.
 * All rights reserved.
 */
package com.zhisheng.core.security.dao.impl;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.zhisheng.core.dao.impl.BaseDaoHibernate;
import com.zhisheng.core.security.dao.SystemDao;
import com.zhisheng.core.security.entity.Resource;
import com.zhisheng.core.security.entity.User;

/**
 * @author xgye
 * @date 2009-9-10
 * @version $Id$
 */

@Repository("systemDao")
public class SystemDaoImpl extends BaseDaoHibernate<User,Integer> implements SystemDao{
	
	@Override
	public List<User> getUserByName(String name) {
		return findByCondition("FROM User user WHERE user.name = ? AND user.disabled = false",name);
	}
	
	@Override
	public List<Resource> listUrlResources(String type) {
		return new ArrayList<Resource>();//findByCondition("FROM Resource resource WHERE resource.type = ? ",type);
	}

}
